package com.crx.springbootinit.controller.user;


import com.crx.springbootinit.annotation.LogApiAnno;
import com.crx.springbootinit.common.BaseResponse;
import com.crx.springbootinit.common.ResultUtils;
import com.crx.springbootinit.model.dto.comment.CommentDto;
import com.crx.springbootinit.model.dto.comment.CommentLoveDto;
import com.crx.springbootinit.model.vo.comment.CommentsVO;
import com.crx.springbootinit.service.ICommentLoveService;
import com.crx.springbootinit.service.ICommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2024-10-21
 */
@RestController
@RequestMapping("/user/commentLove")
@Api(tags = "评论点赞模块接口")
public class CommentLoveController {
    @Autowired
    private ICommentLoveService commentLoveService;
    /**
     * 新增评论
     *
     * @param commentLoveDto 评论点赞请求对象
     * @return 成功消息
     */
    @PostMapping("/add")
    @ResponseBody
    @ApiOperation("评论点赞")
    @LogApiAnno(title = "评论点赞模块", businessType = "POST")
    public BaseResponse addCommentLove(@RequestBody CommentLoveDto commentLoveDto) {
        commentLoveService.giveCommentLove(commentLoveDto);
        return ResultUtils.success(null);
    }

}
